<?php
/* @var $this AppuserController */
/* @var $model Appuser */

$this->breadcrumbs=array(
	Yii::t('base','Appusers')=>array('index'),
	Yii::t('base','Manage'),
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#appuser-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo Yii::t('base','Manage Appusers')?></h1>

<?php echo Yii::t('base','<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>')?>

<?php echo CHtml::link(Yii::t('base','Advanced Search'),'#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->
<a class="btn btn-small create" title="<?php echo Yii::t('base','Create');echo Yii::t('base','Appusers');?>" href="<?php echo Yii::app()->request->baseUrl; ?>/appuser/create"><?php echo Yii::t('base','Create');echo Yii::t('base','Appusers');?></a>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'appuser-grid',
	'dataProvider'=>$model->search(),
	'itemsCssClass'=>'responsive table table-striped table-bordered',
	'pager'=>array('class'=>'CLinkPager','hiddenPageCssClass'=>'','firstPageCssClass'=>'first paginate_button','htmlOptions'=>array('class'=>'dataTables_paginate paging_full_numbers"'),'header'=>""),
	'pagerCssClass'=>'pagination',
	'cssFile'=>false,
	'template'=>'{items}{summary}{pager}',
	'columns'=>array(
		array('name'=>'userid','headerHtmlOptions'=>array('style'=>'width:5%'),'value'=>'User::model()->getUserName($data->userid)'),
		//array('name'=>'send_id','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'imei','headerHtmlOptions'=>array('style'=>'width:8%')),
		array('name'=>'platform','headerHtmlOptions'=>array('style'=>'width:5%'),'value'=>'Application::model()->getplatformName($data->platform)'),//0表示android,1表示ios		
		array('name'=>'app_id','headerHtmlOptions'=>array('style'=>'width:5%'),'value'=>'Application::model()->getApplicationName($data->app_id)'),
		array(
			'class'=>'CButtonColumn',
			'header'=>Yii::t('base','Operate'),
			'viewButtonImageUrl'=>array('class'=>'gicon-edit'),
			'viewButtonOptions'=>array('class'=>'btn btn-small'),
			'updateButtonImageUrl'=>array('class'=>'gicon-edit'),
			'updateButtonOptions'=>array('class'=>'btn btn-small'),
			'deleteButtonImageUrl'=>array('class'=>'gicon-edit'),
			'deleteButtonOptions'=>array('class'=>'btn btn-inverse btn-small'),
			'headerHtmlOptions'=>array('style'=>'width:10%'),
		),
	),
)); ?>
